package org.termine.util;

import java.util.Properties;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import org.apache.log4j.Logger;

@ManagedBean
@ApplicationScoped
public class ConfigurationBean {

	private static Logger logger = Logger.getLogger(ConfigurationBean.class);
	protected Properties properties;

	public ConfigurationBean(){
		try{
			this.properties = new Properties();
			this.properties.load(ConfigurationBean.class.getClassLoader().getResourceAsStream("termine.properties"));
		}catch(Exception e){
			logger.error("error loading configuration from properties file", e);
		}
	}

	public String getProperty(String property){
		return this.properties.getProperty(property);
	}


}
